const merge = require('webpack-merge');
const webpack = require('webpack');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const common = require('./webpack.common.js');

const env = {
	NODE_ENV: '"production"',
    BASE_API: '"https://xxx.xxx.xxx/api"',
}
module.exports = merge(common, {
	devtool: 'source-map',
	plugins: [
		//new UglifyJSPlugin()
		new UglifyJSPlugin({
	       sourceMap: true
	    }),
	    new webpack.DefinePlugin({
	       //'process.env.NODE_ENV': JSON.stringify(env.NODE_ENV),
	       'process.env': env
	     })
	]
});